package servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CharServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    public CharServlet() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//request.setCharacterEncoding("UTF-8");
		String uname = request.getParameter("uname");
		//uname=new String(uname.getBytes("ISO-8859-1"),"UTF-8");
		System.out.println("get uname..." + uname);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//request.setCharacterEncoding("UTF-8");
		String uname = request.getParameter("uname");
		System.out.println("uname..." + uname);
	}

}
